package com.sync.platform.service;

import com.sync.platform.entity.SyncTask;

import java.util.List;

/**
 * Service to manage scheduled tasks
 */
public interface TaskSchedulerService {
    
    /**
     * Schedule a task with a cron expression
     * @param taskId The ID of the task to schedule
     * @param cronExpression The cron expression for scheduling
     * @return true if scheduled successfully
     */
    boolean scheduleTask(Long taskId, String cronExpression);
    
    /**
     * Reschedule a task with a new cron expression
     * @param taskId The ID of the task to reschedule
     * @param cronExpression The new cron expression
     * @return true if rescheduled successfully
     */
    boolean rescheduleTask(Long taskId, String cronExpression);
    
    /**
     * Cancel a scheduled task
     * @param taskId The ID of the task to cancel
     * @return true if cancelled successfully
     */
    boolean cancelTask(Long taskId);
    
    /**
     * Schedule all active tasks from the database
     * @return The number of scheduled tasks
     */
    int scheduleAllTasks();
    
    /**
     * Get a list of all currently scheduled tasks
     * @return List of scheduled tasks
     */
    List<String> getScheduledTasks();
} 